{%insert header.tpl%}
{%widget banner%}
{%assign page context%}
{%assign sc SubCategories%}
{%with sc%}
	{%if ItemCount%}
		{%iterate sc as scat%}
			{%assign category Id%}
			<a href="{% Link %}"><h2>{% context %}</h2></a>
			{%with page%}
				<?php $this->_global_vars_['pgs'] = $this->currentContext()->SubCategoryPages($this->category); ?>
				{%insert homeprodlist.tpl%}
			{%endwith%}
		{%iterate%}
	{%else%}
		{%with page%}
			{%insert productlist.tpl%}
		{%endwith%}
	{%endif%}
{%endwith%}
{%insert footer.tpl%}
